*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    line-height: 1.3;
 
}
body{
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}
.chat-container{
    width: 450px; 
    height: 95vh;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    border-radius: 10px;
}
.chat-header{
    background-color: #007bff;
    padding: 15px;
    text-align: center;
    color: white;
    border-radius:10px 10px 0 0;
    display: flex;
    
}
.chat-header h2{
    align-self: center;
    flex-grow: 1;
}
.mylogo{
    width: 40px;
    height: 40px;
}
.mylogo img{
    align-self: flex-start;
    width: 100%;
    height: 100%;
    border-radius: 20px;
}
.chat-box {
    flex-grow: 1;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-bottom: 1px solid #aaa; 
}
.chat-box::-webkit-scrollbar{
    /*used for hide scrollbar. It looks pretty good🥰*/
    display: none;
}

.message{
    max-width: 80%;
    padding: 10px;
    border-radius:15px;
}

.message.sent{
    /*The align-self property in CSS used to control the alignment of individual flex items within a flex container.*/
    align-self: flex-end;
    background-color: #007bff;
    color: white;
}
.message.received{
    background-color: #ddd;
    align-self: flex-start;
}


.chat-input{
    display: flex;
    padding: 10px;
    background-color:#ccc;
    font-size: 1rem;
    border-radius: 0 0 10px 10px;
}
#messageInput{
    flex-grow: 1;
    /*How much flex item should be grow relative to other.Default value is zero.*/
    padding: 10px;
    border-radius: 5px;
    border: none;
    margin-right: 10px;
    font-size: inherit;
}
#sendBtn{
    
    padding: 10px 20px;
    background-color: #007bff;
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: inherit;
    opacity: 0.7;
}
#sendBtn:hover{
    background-color:#0047fc;
}


i{
    display: none;
}




/* Media queries for smaller devices */
@media screen and (max-width:600px) {
    body{
        position: relative;
    }
    .chat-container{
        position: absolute;
        top: 5px;
        width: 98%;
        height: 90vh;
        border-radius: 0;
    }
    .chat-header{
        padding: 10px;
        border-radius: 0;
    }
    .chat-box{
        padding: 5px;
    }
    .chat-input{
        border-radius: 0;
    }
    #messageInput{
        padding: 8px;
        margin-right: 5px;
    }
    #sendBtn{
        padding: 8px 15px;
    }
    
}
@media screen and (max-width:350px) {
    
    .chat-header h2{
        font-size: 19px;
    }
    .message{
        font-size: 14px;
    }
    #messageInput{
        min-width: 100px;
    }
}